
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
PROJECT(ihefe_cpp_ios)

if (WIN32)
add_definitions(-DNOMINMAX)
SET(ihefe_cpp_ios_SOURCE_DIR ${PROJECT_SOURCE_DIR}/)
SET(WORKING_DIR ${PROJECT_BINARY_DIR}/bin/Debug)
endif(WIN32)


ADD_SUBDIRECTORY(src)

if( CMAKE_BUILD_TYPE STREQUAL "Debug" )
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -Wall -Wno-unused-variable -pthread")
else( CMAKE_BUILD_TYPE STREQUAL "Debug" )
        set(CMAKE_BUILD_TYPE "Release")
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O2 -pthread -fopenmp")
endif( CMAKE_BUILD_TYPE STREQUAL "Debug" )
message("Build Type:" ${CMAKE_BUILD_TYPE} ${CMAKE_CXX_FLAGS})





IF(WIN32)
SET(CMAKE_INSTALL_PATH ${PROJECT_BINARY_DIR}/bin)
INSTALL(DIRECTORY DATA DESTINATION ${CMAKE_INSTALL_PATH})
SET(CMAKE_INSTALL_PATH2 ${PROJECT_BINARY_DIR}/src)
INSTALL(DIRECTORY DATA DESTINATION ${CMAKE_INSTALL_PATH2})

INSTALL(FILES winCopydll.bat DESTINATION ${PROJECT_BINARY_DIR})

ENDIF(WIN32)
IF(UNIX)
SET(CMAKE_INSTALL_PATH ${PROJECT_BINARY_DIR})
INSTALL(DIRECTORY DATA DESTINATION ${CMAKE_INSTALL_PATH})
ENDIF(UNIX)

